package com.huiyou.adminapi.common.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import org.hibernate.annotations.GenericGenerator;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.*;

import lombok.Data;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * 防伪码模型
 */

@Entity
@Table(name = "pseudo")
@Data
public class PseudoCode {

    @Id
    private String id;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 商品批次
     */
    private String goodsBatch;

    /**
     * 商品编号 系统生成
     */
    private String goodsNumber;

    /**
     * 防伪码
     */
    private String securityCodeNumber;

    /**
     * 查询次数
     */
    private int queryNumber;

    /**
     * 生成时间
     */
    private Long createTime;

    @OneToMany(fetch = FetchType.EAGER, cascade = {CascadeType.ALL})
    @JoinColumn(name = "pseudo_id")
    @JsonIgnoreProperties({"pseudo"})
    private List<AreaInfo> areaInfoList;

}
